#include <reg52.H>
#include "Delay.h"

sbit X = P2^2 ;
sbit Y = P2^3 ;
sbit Z = P2^4 ;

unsigned char NixieTable[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x39,0x0F,0x80,0x00,0x40};//0x39=[  0x0F=]  0x80=.   0x00=
void Nixie(unsigned char Location,Number)
{
	switch(Location)		
	{
		case 1:Z=1;Y=1;X=1;break;
		case 2:Z=1;Y=1;X=0;break;
		case 3:Z=1;Y=0;X=1;break;
		case 4:Z=1;Y=0;X=0;break;
		case 5:Z=0;Y=1;X=1;break;
		case 6:Z=0;Y=1;X=0;break;
		case 7:Z=0;Y=0;X=1;break;
		case 8:Z=0;Y=0;X=0;break;
	}
	P0=NixieTable[Number];	
	Delay(1);				
	P0=0x00;				
}